import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/login',
    name: 'login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/LoginView.vue')
  },
  {
    path: '/adminhome',
    name: 'adminhome',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminhome.vue'),
    children:[
      {
        path: '/select',
        name: 'select',

        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminhome/SelectallView.vue')
      },
      {
        path: '/details',
        name: 'details',

        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminhome/DetailsView.vue')
      },
    ]
  },
  {
    path: '/index',
    name: 'index',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/IndexView.vue'),
    children: [
      {

        path: '/home',
        name: 'home',

        component: () => import(/* webpackChunkName: "about" */ '../views/index/home.vue')
      },
      {
        path: '/research',
        name: 'research',

        component: () => import(/* webpackChunkName: "about" */ '../views/index/research.vue')
      },
      {
        path: '/members',
        name: 'members',

        component: () => import(/* webpackChunkName: "about" */ '../views/index/members.vue')
      },
      {
        path: '/project',
        name: 'project',

        component: () => import(/* webpackChunkName: "about" */ '../views/index/project.vue'),
        children:[
          
          {

            path: '/test1',
            name: 'test1',
    
            component: () => import(/* webpackChunkName: "about" */ '../views/index/project/test1.vue')
          },
          {

            path: '/test2',
            name: 'test2',
    
            component: () => import(/* webpackChunkName: "about" */ '../views/index/project/test2.vue')
          },
        ]
      },
      {
        path: '/util',
        name: 'util',

        component: () => import(/* webpackChunkName: "about" */ '../views/index/util.vue')
      }
    ]
  },
 
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
